#include "serial_port1_set.h"
#include "ui_serial_port1_set.h"

serial_port1_set::serial_port1_set(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::serial_port1_set)
{
    ui->setupUi(this);
}

serial_port1_set::~serial_port1_set()
{
    delete ui;
}

void serial_port1_set::languageReload()
{
    ui->retranslateUi(this);
}

void serial_port1_set::on_btn_cancel_clicked()
{
    this->hide();
}

void serial_port1_set::on_btn_ok_clicked()
{
    QString baud = ui->BaudrateCb->currentText();
    int data = ui->DatabitsCb->currentText().toInt();
    QString stopBit = ui->StopbitCb->currentText();
    emit set_port1_msg(baud,data,stopBit);
    this->hide();
}
